import numpy as np
X=np.array([1.0,0.5])#(1,2)
W1=np.array([[0.1,0.3,0.5],[0.2,0.4,0.6]])#(2,3)
B1=np.array([0.1,0.2,0.3])
A1=np.dot(X,W1)+B1 #(1,3)
print("-------激活前---------")
print(A1)
def sigmoid(x):
    return 1/(1+np.exp(-x))
Z1=sigmoid(A1)#（1,3）
print("-------激活后---------")
print(Z1)
print("-------第一层结束------------")
W2=np.array([[0.1,0.4],[0.2,0.5],[0.3,0.6]])#(3,2)
B2=np.array([0.1,0.2])
A2=np.dot(Z1,W2)+B2 #(1,2)
print("-------激活前---------")
print(A2)
Z2=sigmoid(A2) #(1,2)
print(Z2)
print("-------第二层结束-----------")
def identity_function(x):#恒等函数
    return x
W3=np.array([[0.1,0.3],[0.2,0.4]])#(2,2)
B3=np.array([0.1,0.2])
A3=np.dot(Z2,W3)+B3 #(1,2)
print("-------激活前---------")
print(A3)
Y=identity_function(A3)
print("-------激活后---------")
print(Y)
print("-------结束-----------")

